<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title></title>
<link rel="stylesheet" href="../layui/css/layui.css">
<link rel="stylesheet" href="../css/general.css">
<link rel="stylesheet" href="../css/staff/index.css">
</head>
<body class="layui-layout-body">
<div id="staff-index" class="layui-layout layui-layout-admin">
	<div class="layui-header">
		<div class="layui-logo"><img src="../img/common/logo.jpg" alt=""></div>
		<!-- 头部区域（可配合layui已有的水平导航） -->
		<h1>魔力公寓</h1>
		<ul class="layui-nav layui-layout-right">
			<li class="layui-nav-item"> <a href="javascript:;">{{userinfo.loginName}}<img src="../img/common/icon07.gif" class="layui-nav-img"></a>
				<dl class="layui-nav-child">
					<dd><a href="../staff/modify_password.html"><img src="../img/common/icon08.png" alt=""><span>修改密码</span></a></dd>
					<dd><a href="../staff/bank_card.html"><img src="../img/common/icon09.png" alt=""><span>银行卡信息</span></a></dd>
					<dd><a href="javascript:;" @click.stop="doLogout"><img src="../img/common/icon10.png" alt=""><span>安全退出</span></a></dd>
				</dl>
			</li>
		</ul>
	</div>
	<div class="layui-side layui-bg-black">
		<div class="layui-side-scroll"> 
			<!-- 左侧导航区域（可配合layui已有的垂直导航） -->
			<ul class="layui-nav layui-nav-tree"  lay-filter="test">
				<li class="layui-nav-item"><a href="../survey/index.html"><img src="../img/common/icon01.png" alt="">概况</a></li>
				<li class="layui-nav-item"><a href="../rental/index.html"><img src="../img/common/icon02.png" alt="">租务</a></li>
				<li class="layui-nav-item"><a href="../financial_affairs/index.html"><img src="../img/common/icon03.png" alt="">财务</a></li>
				<li class="layui-nav-item"><a href="../reports/index.html"><img src="../img/common/icon04.png" alt="">报表</a></li>
				<li class="layui-nav-item"><a href="../separate_accounts/index.html"><img src="../img/common/icon05.png" alt="">分账</a></li>
				<li class="layui-nav-item on"><a href="../staff/index.html"><img src="../img/common/icon06.png" alt="">员工</a></li>
			</ul>
		</div>
	</div>
	<div class="layui-body"> 
		<!-- 内容主体区域 -->
		<div class="leftContent">
			<p class="layui-title">员工管理</p>
			<ul class="layui-menu">
				<li><a href="index.html" class="on">员工管理</a></li>
				<li><a href="role.html">角色管理</a></li>
			</ul>
		</div>
		<div class="rightContent">
			<div class="section">
				<div class="add"><a href="javascript:;" @click="showSubjoin" class="layui-btn">添加员工</a></div>
				<table class="layui-table" lay-even>
					<colgroup>
					<col width="20%">
					<col width="20%">
					<col width="20%">
					<col width="20%">
					<col width="20%">
					</colgroup>
					<thead>
						<tr>
							<th>员工名称</th>
							<th>员工账号</th>
							<th>员工角色</th>
							<th>生成时间</th>
							<th>操作</th>
						</tr>
					</thead>
					<tbody v-if="emplList.length>0">
						<tr v-for="empl in emplList">
							<td v-text="empl.emplName">张大全</td>
							<td v-text="empl.loginName">17263987129@moli</td>
							<td v-text="empl.roleName">管家</td>
							<td v-text="empl.createTime">2018-02-22 15:54:34</td>
							<td><a href="javascript:;" @click="openEditEmpl(empl)" class="layui-btn">编辑</a></td>
						</tr>
					</tbody>
				</table>
				<div v-if="emplList.length==0" class="nothing-box">暂无员工</div>
				<div class="staff-box subjoin" v-show="isShowSubjoin">
					<div class="close"><img @click="isShowSubjoin=!isShowSubjoin" src="../img/common/close_img.gif" alt=""></div>
					<p class="headline">添加员工</p>
					<form class="layui-form" action="">
						<ul class="detail-list">
							<li>
								<div class="layui-input-inline">
									<p>员工名称</p>
									<input v-model.trim="empl.emplName" type="text" placeholder="请输入员工名称" autocomplete="off" class="layui-input layui-input02" :class="status.empl.add.emplName">
								</div>
								<div class="layui-input-inline" :class="status.empl.add.roleId">
									<p>员工角色</p>
									<select v-model="empl.roleId">
										<option value="">请输入员工角色</option>
										<option v-for="r in roleList" v-text="r.roleName" :value="r.roleName">管家</option>
									</select>
								</div>
							</li>
							<li>
								<div class="layui-input-inline">
									<p>员工账号</p>
									<input v-model.trim="empl.loginName" type="text" placeholder="请输入员工账号" autocomplete="off" class="layui-input layui-input03" :class="status.empl.add.loginName">
								</div>
								<span>@migy</span> </li>
							<li>
								<p>员工密码</p>
								<input v-model.trim="empl.pwd" type="password" placeholder="请输入员工密码" autocomplete="off" class="layui-input" :class="status.empl.add.pwd">
							</li>
						</ul>
						<ul class="submit">
							<li>
								<button @click.prevent="addEmpl" class="layui-btn layui-btn-primary" lay-submit lay-filter="formDemo">保存</button>
							</li>
						</ul>
					</form>
				</div>
				<div class="staff-box edit" v-show="isShowEdit">
					<div class="close"><img @click="isShowEdit=!isShowEdit" src="../img/common/close_img.gif" alt=""></div>
					<p class="headline">编辑员工</p>
					<form class="layui-form" action="">
						<ul class="detail-list">
							<li>
								<div class="layui-input-inline">
									<p>员工名称</p>
									<input v-model.trim="empl.emplName" type="text" placeholder="请输入员工名称" autocomplete="off" class="layui-input layui-input02" :class="status.empl.edit.emplName">
								</div>
								<div class="layui-input-inline" :class="status.empl.edit.roleId">
									<p>员工角色</p>
									<select v-model="empl.roleId">
										<option value="">请输入员工角色</option>
										<option v-for="r in roleList" v-text="r.roleName" :value="r.roleName">管家</option>
									</select>
								</div>
							</li>
							<li>
								<div class="layui-input-inline">
									<p>员工账号</p>
									<input v-model.trim="empl.loginName" type="text" placeholder="请输入员工账号" autocomplete="off" class="layui-input layui-input03" :class="status.empl.edit.loginName">
								</div>
								<span>@migy</span> </li>
							<li>
								<p>员工密码</p>
								<input v-model.trim="empl.pwd" type="password" placeholder="请输入员工密码" autocomplete="off" class="layui-input" :class="status.empl.edit.pwd">
							</li>
						</ul>
						<ul class="submit">
							<li>
								<button @click.prevent="editEmpl" class="layui-btn layui-btn-primary" lay-submit lay-filter="formDemo">保存</button>
							</li>
						</ul>
					</form>
				</div>
			</div>
		</div>
	</div>
</div>
<script src="../layui/layui.js"></script>
<script src="../js/jquery-3.3.1.min.js"></script>
<script src="../js/moment.min.js"></script>
<script src="../js/storejson2.min.js"></script>
<script src="../js/mock.js"></script>
<script src="../js/mockdata.js"></script>
<script src="../js/vue.min.js"></script>
<script src="../js/vue.global.js"></script>
<script src="../js/staff/index.js"></script>
<!--<script>
//JavaScript代码区域
layui.use('element', function(){
  var element = layui.element;
  
});


//Demo
layui.use('form', function(){
  var form = layui.form;
  
  //监听提交
  form.on('submit(formDemo)', function(data){
    layer.msg(JSON.stringify(data.field));
    return false;
  });
});

</script>-->
</body>
</html>